// LANGUAGE: +MultiDollarInterpolation
// DIAGNOSTICS: -warnings
// WITH_STDLIB
// IGNORE_BACKEND_K1: JVM_IR
// ISSUE: KT-69062

fun box(): String {
    try {
        // interpolation prefix length: 1, 2, 4, 8
        // string literal kinds: single-line, multi-line
        testEquivalence(marker = "empty", reference = "", listOf(
            $"",
            $$"",
            $$$$"",
            $$$$$$$$"",
            $"""""",
            $$"""""",
            $$$$"""""",
            $$$$$$$$"""""",
        ))
        // interpolation prefix length: 1, 2, 4, 8
        // string literal kinds: single-line, multi-line
        testEquivalence(marker = "noInterpolation", reference = "padding", listOf(
            $"padding",
            $$"padding",
            $$$$"padding",
            $$$$$$$$"padding",
            $"""padding""",
            $$"""padding""",
            $$$$"""padding""",
            $$$$$$$$"""padding""",
        ))
        // interpolation prefix length: 2, 4, 8
        // interpolation kinds: of simple identifier, of identifier in backticks, of arbitrary expression
        // string literal kinds: single-line, multi-line
        testEquivalence("notEnoughDollarsA", "padding \$value padding", $$"padding $value padding")
        testEquivalence("notEnoughDollarsB", "padding $$\$value padding", $$$$"padding $$$value padding")
        testEquivalence("notEnoughDollarsC", "padding $$$$$$\$value padding", $$$$$$$$"padding $$$$$$$value padding")
        testEquivalence("notEnoughDollarsD", "padding \$`value` padding", $$"padding $`value` padding")
        testEquivalence("notEnoughDollarsE", "padding $$\$`value` padding", $$$$"padding $$$`value` padding")
        testEquivalence("notEnoughDollarsF", "padding $$$$$$\$`value` padding", $$$$$$$$"padding $$$$$$$`value` padding")
        testEquivalence("notEnoughDollarsG", "padding \${0 + value} padding", $$"padding ${0 + value} padding")
        testEquivalence("notEnoughDollarsH", "padding $$\${0 + value} padding", $$$$"padding $$${0 + value} padding")
        testEquivalence("notEnoughDollarsI", "padding $$$$$$\${0 + value} padding", $$$$$$$$"padding $$$$$$${0 + value} padding")
        testEquivalence("notEnoughDollarsJ", "padding \$value padding", $$"""padding $value padding""")
        testEquivalence("notEnoughDollarsK", "padding $$\$value padding", $$$$"""padding $$$value padding""")
        testEquivalence("notEnoughDollarsL", "padding $$$$$$\$value padding", $$$$$$$$"""padding $$$$$$$value padding""")
        testEquivalence("notEnoughDollarsM", "padding \$`value` padding", $$"""padding $`value` padding""")
        testEquivalence("notEnoughDollarsN", "padding $$\$`value` padding", $$$$"""padding $$$`value` padding""")
        testEquivalence("notEnoughDollarsO", "padding $$$$$$\$`value` padding", $$$$$$$$"""padding $$$$$$$`value` padding""")
        testEquivalence("notEnoughDollarsP", "padding \${0 + value} padding", $$"""padding ${0 + value} padding""")
        testEquivalence("notEnoughDollarsQ", "padding $$\${0 + value} padding", $$$$"""padding $$${0 + value} padding""")
        testEquivalence("notEnoughDollarsR", "padding $$$$$$\${0 + value} padding", $$$$$$$$"""padding $$$$$$${0 + value} padding""")
        // interpolation prefix length: 1, 2, 4, 8
        // interpolation kinds: of simple identifier, of identifier in backticks, of arbitrary expression
        // string literal kinds: single-line, multi-line
        testEquivalence(marker = "redundantInterpolation", reference = "text", listOf(
            $"$text",
            $$"$$text",
            $$$$"$$$$text",
            $$$$$$$$"$$$$$$$$text",
            $"$`text`",
            $$"$$`text`",
            $$$$"$$$$`text`",
            $$$$$$$$"$$$$$$$$`text`",
            $"${"" + text}",
            $$"$${"" + text}",
            $$$$"$$$${"" + text}",
            $$$$$$$$"$$$$$$$${"" + text}",
            $"""$text""",
            $$"""$$text""",
            $$$$"""$$$$text""",
            $$$$$$$$"""$$$$$$$$text""",
            $"""$`text`""",
            $$"""$$`text`""",
            $$$$"""$$$$`text`""",
            $$$$$$$$"""$$$$$$$$`text`""",
            $"""${"" + text}""",
            $$"""$${"" + text}""",
            $$$$"""$$$${"" + text}""",
            $$$$$$$$"""$$$$$$$${"" + text}""",
        ))
        // interpolation prefix length: 1, 2, 4, 8
        // interpolation kinds: of simple identifier, of identifier in backticks, of arbitrary expression
        // string literal kinds: single-line, multi-line
        testEquivalence(marker = "simpleStringInterpolation", reference = "padding text padding", listOf(
            $"padding $text padding",
            $$"padding $$text padding",
            $$$$"padding $$$$text padding",
            $$$$$$$$"padding $$$$$$$$text padding",
            $"padding $`text` padding",
            $$"padding $$`text` padding",
            $$$$"padding $$$$`text` padding",
            $$$$$$$$"padding $$$$$$$$`text` padding",
            $"padding ${"" + text} padding",
            $$"padding $${"" + text} padding",
            $$$$"padding $$$${"" + text} padding",
            $$$$$$$$"padding $$$$$$$${"" + text} padding",
            $"""padding $text padding""",
            $$"""padding $$text padding""",
            $$$$"""padding $$$$text padding""",
            $$$$$$$$"""padding $$$$$$$$text padding""",
            $"""padding $`text` padding""",
            $$"""padding $$`text` padding""",
            $$$$"""padding $$$$`text` padding""",
            $$$$$$$$"""padding $$$$$$$$`text` padding""",
            $"""padding ${"" + text} padding""",
            $$"""padding $${"" + text} padding""",
            $$$$"""padding $$$${"" + text} padding""",
            $$$$$$$$"""padding $$$$$$$${"" + text} padding""",
        ))
        // interpolation prefix length: 1, 2, 4, 8
        // interpolation kinds: of simple identifier, of identifier in backticks, of arbitrary expression
        // string literal kinds: single-line, multi-line
        testEquivalence(marker = "simpleNonStringInterpolation", reference = "42", listOf(
            $"$value",
            $$"$$value",
            $$$$"$$$$value",
            $$$$$$$$"$$$$$$$$value",
            $"$`value`",
            $$"$$`value`",
            $$$$"$$$$`value`",
            $$$$$$$$"$$$$$$$$`value`",
            $"${0 + value}",
            $$"$${0 + value}",
            $$$$"$$$${0 + value}",
            $$$$$$$$"$$$$$$$${0 + value}",
            $"""$value""",
            $$"""$$value""",
            $$$$"""$$$$value""",
            $$$$$$$$"""$$$$$$$$value""",
            $"""$`value`""",
            $$"""$$`value`""",
            $$$$"""$$$$`value`""",
            $$$$$$$$"""$$$$$$$$`value`""",
            $"""${0 + value}""",
            $$"""$${0 + value}""",
            $$$$"""$$$${0 + value}""",
            $$$$$$$$"""$$$$$$$${0 + value}""",
        ))
        // interpolation prefix length: 1, 2, 4, 8
        // interpolation kinds: of simple identifier, of identifier in backticks, of arbitrary expression
        // string literal kinds: single-line, multi-line
        testEquivalence(marker = "tooManyDollars", reference = "padding \$text padding", listOf(
            $"padding $$text padding",
            $$"padding $$$text padding",
            $$$$"padding $$$$$text padding",
            $$$$$$$$"padding $$$$$$$$$text padding",
            $"padding $$`text` padding",
            $$"padding $$$`text` padding",
            $$$$"padding $$$$$`text` padding",
            $$$$$$$$"padding $$$$$$$$$`text` padding",
            $"padding $${"" + text} padding",
            $$"padding $$${"" + text} padding",
            $$$$"padding $$$$${"" + text} padding",
            $$$$$$$$"padding $$$$$$$$${"" + text} padding",
            $"""padding $$text padding""",
            $$"""padding $$$text padding""",
            $$$$"""padding $$$$$text padding""",
            $$$$$$$$"""padding $$$$$$$$$text padding""",
            $"""padding $$`text` padding""",
            $$"""padding $$$`text` padding""",
            $$$$"""padding $$$$$`text` padding""",
            $$$$$$$$"""padding $$$$$$$$$`text` padding""",
            $"""padding $${"" + text} padding""",
            $$"""padding $$${"" + text} padding""",
            $$$$"""padding $$$$${"" + text} padding""",
            $$$$$$$$"""padding $$$$$$$$${"" + text} padding""",
        ))
        // interpolation prefix length: 1, 2, 4, 8
        // interpolation kinds A: of simple identifier, of identifier in backticks, of arbitrary expression
        // interpolation kinds B: of simple identifier, of identifier in backticks, of arbitrary expression
        // string literal kinds: single-line, multi-line
        testEquivalence(marker = "sequentialInterpolation", reference = "padding text42 padding", listOf(
            $"padding $text$value padding",
            $$"padding $$text$$value padding",
            $$$$"padding $$$$text$$$$value padding",
            $$$$$$$$"padding $$$$$$$$text$$$$$$$$value padding",
            $"padding $`text`$value padding",
            $$"padding $$`text`$$value padding",
            $$$$"padding $$$$`text`$$$$value padding",
            $$$$$$$$"padding $$$$$$$$`text`$$$$$$$$value padding",
            $"padding ${"" + text}$value padding",
            $$"padding $${"" + text}$$value padding",
            $$$$"padding $$$${"" + text}$$$$value padding",
            $$$$$$$$"padding $$$$$$$${"" + text}$$$$$$$$value padding",
            $"padding $text$`value` padding",
            $$"padding $$text$$`value` padding",
            $$$$"padding $$$$text$$$$`value` padding",
            $$$$$$$$"padding $$$$$$$$text$$$$$$$$`value` padding",
            $"padding $`text`$`value` padding",
            $$"padding $$`text`$$`value` padding",
            $$$$"padding $$$$`text`$$$$`value` padding",
            $$$$$$$$"padding $$$$$$$$`text`$$$$$$$$`value` padding",
            $"padding ${"" + text}$`value` padding",
            $$"padding $${"" + text}$$`value` padding",
            $$$$"padding $$$${"" + text}$$$$`value` padding",
            $$$$$$$$"padding $$$$$$$${"" + text}$$$$$$$$`value` padding",
            $"padding $text${0 + value} padding",
            $$"padding $$text$${0 + value} padding",
            $$$$"padding $$$$text$$$${0 + value} padding",
            $$$$$$$$"padding $$$$$$$$text$$$$$$$${0 + value} padding",
            $"padding $`text`${0 + value} padding",
            $$"padding $$`text`$${0 + value} padding",
            $$$$"padding $$$$`text`$$$${0 + value} padding",
            $$$$$$$$"padding $$$$$$$$`text`$$$$$$$${0 + value} padding",
            $"padding ${"" + text}${0 + value} padding",
            $$"padding $${"" + text}$${0 + value} padding",
            $$$$"padding $$$${"" + text}$$$${0 + value} padding",
            $$$$$$$$"padding $$$$$$$${"" + text}$$$$$$$${0 + value} padding",
            $"""padding $text$value padding""",
            $$"""padding $$text$$value padding""",
            $$$$"""padding $$$$text$$$$value padding""",
            $$$$$$$$"""padding $$$$$$$$text$$$$$$$$value padding""",
            $"""padding $`text`$value padding""",
            $$"""padding $$`text`$$value padding""",
            $$$$"""padding $$$$`text`$$$$value padding""",
            $$$$$$$$"""padding $$$$$$$$`text`$$$$$$$$value padding""",
            $"""padding ${"" + text}$value padding""",
            $$"""padding $${"" + text}$$value padding""",
            $$$$"""padding $$$${"" + text}$$$$value padding""",
            $$$$$$$$"""padding $$$$$$$${"" + text}$$$$$$$$value padding""",
            $"""padding $text$`value` padding""",
            $$"""padding $$text$$`value` padding""",
            $$$$"""padding $$$$text$$$$`value` padding""",
            $$$$$$$$"""padding $$$$$$$$text$$$$$$$$`value` padding""",
            $"""padding $`text`$`value` padding""",
            $$"""padding $$`text`$$`value` padding""",
            $$$$"""padding $$$$`text`$$$$`value` padding""",
            $$$$$$$$"""padding $$$$$$$$`text`$$$$$$$$`value` padding""",
            $"""padding ${"" + text}$`value` padding""",
            $$"""padding $${"" + text}$$`value` padding""",
            $$$$"""padding $$$${"" + text}$$$$`value` padding""",
            $$$$$$$$"""padding $$$$$$$${"" + text}$$$$$$$$`value` padding""",
            $"""padding $text${0 + value} padding""",
            $$"""padding $$text$${0 + value} padding""",
            $$$$"""padding $$$$text$$$${0 + value} padding""",
            $$$$$$$$"""padding $$$$$$$$text$$$$$$$${0 + value} padding""",
            $"""padding $`text`${0 + value} padding""",
            $$"""padding $$`text`$${0 + value} padding""",
            $$$$"""padding $$$$`text`$$$${0 + value} padding""",
            $$$$$$$$"""padding $$$$$$$$`text`$$$$$$$${0 + value} padding""",
            $"""padding ${"" + text}${0 + value} padding""",
            $$"""padding $${"" + text}$${0 + value} padding""",
            $$$$"""padding $$$${"" + text}$$$${0 + value} padding""",
            $$$$$$$$"""padding $$$$$$$${"" + text}$$$$$$$${0 + value} padding""",
        ))
        // inner interpolation prefix length: 0, 1, 2, 4, 8
        // outer interpolation prefix length: 1, 2, 4, 8
        // interpolation kinds: of simple identifier, of identifier in backticks, of arbitrary expression
        // inner string literal kinds: single-line, multi-line
        // outer string literal kinds: single-line, multi-line
        testEquivalence(marker = "nestedInterpolation", reference = "padding moretext padding", listOf(
            $"padding ${"more$text"} padding",
            $"padding ${$"more$text"} padding",
            $"padding ${$$"more$$text"} padding",
            $"padding ${$$$$"more$$$$text"} padding",
            $"padding ${$$$$$$$$"more$$$$$$$$text"} padding",
            $$"padding $${"more$text"} padding",
            $$"padding $${$"more$text"} padding",
            $$"padding $${$$"more$$text"} padding",
            $$"padding $${$$$$"more$$$$text"} padding",
            $$"padding $${$$$$$$$$"more$$$$$$$$text"} padding",
            $$$$"padding $$$${"more$text"} padding",
            $$$$"padding $$$${$"more$text"} padding",
            $$$$"padding $$$${$$"more$$text"} padding",
            $$$$"padding $$$${$$$$"more$$$$text"} padding",
            $$$$"padding $$$${$$$$$$$$"more$$$$$$$$text"} padding",
            $$$$$$$$"padding $$$$$$$${"more$text"} padding",
            $$$$$$$$"padding $$$$$$$${$"more$text"} padding",
            $$$$$$$$"padding $$$$$$$${$$"more$$text"} padding",
            $$$$$$$$"padding $$$$$$$${$$$$"more$$$$text"} padding",
            $$$$$$$$"padding $$$$$$$${$$$$$$$$"more$$$$$$$$text"} padding",
            $"padding ${"more$`text`"} padding",
            $"padding ${$"more$`text`"} padding",
            $"padding ${$$"more$$`text`"} padding",
            $"padding ${$$$$"more$$$$`text`"} padding",
            $"padding ${$$$$$$$$"more$$$$$$$$`text`"} padding",
            $$"padding $${"more$`text`"} padding",
            $$"padding $${$"more$`text`"} padding",
            $$"padding $${$$"more$$`text`"} padding",
            $$"padding $${$$$$"more$$$$`text`"} padding",
            $$"padding $${$$$$$$$$"more$$$$$$$$`text`"} padding",
            $$$$"padding $$$${"more$`text`"} padding",
            $$$$"padding $$$${$"more$`text`"} padding",
            $$$$"padding $$$${$$"more$$`text`"} padding",
            $$$$"padding $$$${$$$$"more$$$$`text`"} padding",
            $$$$"padding $$$${$$$$$$$$"more$$$$$$$$`text`"} padding",
            $$$$$$$$"padding $$$$$$$${"more$`text`"} padding",
            $$$$$$$$"padding $$$$$$$${$"more$`text`"} padding",
            $$$$$$$$"padding $$$$$$$${$$"more$$`text`"} padding",
            $$$$$$$$"padding $$$$$$$${$$$$"more$$$$`text`"} padding",
            $$$$$$$$"padding $$$$$$$${$$$$$$$$"more$$$$$$$$`text`"} padding",
            $"padding ${"more${"" + text}"} padding",
            $"padding ${$"more${"" + text}"} padding",
            $"padding ${$$"more$${"" + text}"} padding",
            $"padding ${$$$$"more$$$${"" + text}"} padding",
            $"padding ${$$$$$$$$"more$$$$$$$${"" + text}"} padding",
            $$"padding $${"more${"" + text}"} padding",
            $$"padding $${$"more${"" + text}"} padding",
            $$"padding $${$$"more$${"" + text}"} padding",
            $$"padding $${$$$$"more$$$${"" + text}"} padding",
            $$"padding $${$$$$$$$$"more$$$$$$$${"" + text}"} padding",
            $$$$"padding $$$${"more${"" + text}"} padding",
            $$$$"padding $$$${$"more${"" + text}"} padding",
            $$$$"padding $$$${$$"more$${"" + text}"} padding",
            $$$$"padding $$$${$$$$"more$$$${"" + text}"} padding",
            $$$$"padding $$$${$$$$$$$$"more$$$$$$$${"" + text}"} padding",
            $$$$$$$$"padding $$$$$$$${"more${"" + text}"} padding",
            $$$$$$$$"padding $$$$$$$${$"more${"" + text}"} padding",
            $$$$$$$$"padding $$$$$$$${$$"more$${"" + text}"} padding",
            $$$$$$$$"padding $$$$$$$${$$$$"more$$$${"" + text}"} padding",
            $$$$$$$$"padding $$$$$$$${$$$$$$$$"more$$$$$$$${"" + text}"} padding",
            $"padding ${"""more$text"""} padding",
            $"padding ${$"""more$text"""} padding",
            $"padding ${$$"""more$$text"""} padding",
            $"padding ${$$$$"""more$$$$text"""} padding",
            $"padding ${$$$$$$$$"""more$$$$$$$$text"""} padding",
            $$"padding $${"""more$text"""} padding",
            $$"padding $${$"""more$text"""} padding",
            $$"padding $${$$"""more$$text"""} padding",
            $$"padding $${$$$$"""more$$$$text"""} padding",
            $$"padding $${$$$$$$$$"""more$$$$$$$$text"""} padding",
            $$$$"padding $$$${"""more$text"""} padding",
            $$$$"padding $$$${$"""more$text"""} padding",
            $$$$"padding $$$${$$"""more$$text"""} padding",
            $$$$"padding $$$${$$$$"""more$$$$text"""} padding",
            $$$$"padding $$$${$$$$$$$$"""more$$$$$$$$text"""} padding",
            $$$$$$$$"padding $$$$$$$${"""more$text"""} padding",
            $$$$$$$$"padding $$$$$$$${$"""more$text"""} padding",
            $$$$$$$$"padding $$$$$$$${$$"""more$$text"""} padding",
            $$$$$$$$"padding $$$$$$$${$$$$"""more$$$$text"""} padding",
            $$$$$$$$"padding $$$$$$$${$$$$$$$$"""more$$$$$$$$text"""} padding",
            $"padding ${"""more$`text`"""} padding",
            $"padding ${$"""more$`text`"""} padding",
            $"padding ${$$"""more$$`text`"""} padding",
            $"padding ${$$$$"""more$$$$`text`"""} padding",
            $"padding ${$$$$$$$$"""more$$$$$$$$`text`"""} padding",
            $$"padding $${"""more$`text`"""} padding",
            $$"padding $${$"""more$`text`"""} padding",
            $$"padding $${$$"""more$$`text`"""} padding",
            $$"padding $${$$$$"""more$$$$`text`"""} padding",
            $$"padding $${$$$$$$$$"""more$$$$$$$$`text`"""} padding",
            $$$$"padding $$$${"""more$`text`"""} padding",
            $$$$"padding $$$${$"""more$`text`"""} padding",
            $$$$"padding $$$${$$"""more$$`text`"""} padding",
            $$$$"padding $$$${$$$$"""more$$$$`text`"""} padding",
            $$$$"padding $$$${$$$$$$$$"""more$$$$$$$$`text`"""} padding",
            $$$$$$$$"padding $$$$$$$${"""more$`text`"""} padding",
            $$$$$$$$"padding $$$$$$$${$"""more$`text`"""} padding",
            $$$$$$$$"padding $$$$$$$${$$"""more$$`text`"""} padding",
            $$$$$$$$"padding $$$$$$$${$$$$"""more$$$$`text`"""} padding",
            $$$$$$$$"padding $$$$$$$${$$$$$$$$"""more$$$$$$$$`text`"""} padding",
            $"padding ${"""more${"" + text}"""} padding",
            $"padding ${$"""more${"" + text}"""} padding",
            $"padding ${$$"""more$${"" + text}"""} padding",
            $"padding ${$$$$"""more$$$${"" + text}"""} padding",
            $"padding ${$$$$$$$$"""more$$$$$$$${"" + text}"""} padding",
            $$"padding $${"""more${"" + text}"""} padding",
            $$"padding $${$"""more${"" + text}"""} padding",
            $$"padding $${$$"""more$${"" + text}"""} padding",
            $$"padding $${$$$$"""more$$$${"" + text}"""} padding",
            $$"padding $${$$$$$$$$"""more$$$$$$$${"" + text}"""} padding",
            $$$$"padding $$$${"""more${"" + text}"""} padding",
            $$$$"padding $$$${$"""more${"" + text}"""} padding",
            $$$$"padding $$$${$$"""more$${"" + text}"""} padding",
            $$$$"padding $$$${$$$$"""more$$$${"" + text}"""} padding",
            $$$$"padding $$$${$$$$$$$$"""more$$$$$$$${"" + text}"""} padding",
            $$$$$$$$"padding $$$$$$$${"""more${"" + text}"""} padding",
            $$$$$$$$"padding $$$$$$$${$"""more${"" + text}"""} padding",
            $$$$$$$$"padding $$$$$$$${$$"""more$${"" + text}"""} padding",
            $$$$$$$$"padding $$$$$$$${$$$$"""more$$$${"" + text}"""} padding",
            $$$$$$$$"padding $$$$$$$${$$$$$$$$"""more$$$$$$$${"" + text}"""} padding",
            $"""padding ${"more$text"} padding""",
            $"""padding ${$"more$text"} padding""",
            $"""padding ${$$"more$$text"} padding""",
            $"""padding ${$$$$"more$$$$text"} padding""",
            $"""padding ${$$$$$$$$"more$$$$$$$$text"} padding""",
            $$"""padding $${"more$text"} padding""",
            $$"""padding $${$"more$text"} padding""",
            $$"""padding $${$$"more$$text"} padding""",
            $$"""padding $${$$$$"more$$$$text"} padding""",
            $$"""padding $${$$$$$$$$"more$$$$$$$$text"} padding""",
            $$$$"""padding $$$${"more$text"} padding""",
            $$$$"""padding $$$${$"more$text"} padding""",
            $$$$"""padding $$$${$$"more$$text"} padding""",
            $$$$"""padding $$$${$$$$"more$$$$text"} padding""",
            $$$$"""padding $$$${$$$$$$$$"more$$$$$$$$text"} padding""",
            $$$$$$$$"""padding $$$$$$$${"more$text"} padding""",
            $$$$$$$$"""padding $$$$$$$${$"more$text"} padding""",
            $$$$$$$$"""padding $$$$$$$${$$"more$$text"} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$"more$$$$text"} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$$$$$"more$$$$$$$$text"} padding""",
            $"""padding ${"more$`text`"} padding""",
            $"""padding ${$"more$`text`"} padding""",
            $"""padding ${$$"more$$`text`"} padding""",
            $"""padding ${$$$$"more$$$$`text`"} padding""",
            $"""padding ${$$$$$$$$"more$$$$$$$$`text`"} padding""",
            $$"""padding $${"more$`text`"} padding""",
            $$"""padding $${$"more$`text`"} padding""",
            $$"""padding $${$$"more$$`text`"} padding""",
            $$"""padding $${$$$$"more$$$$`text`"} padding""",
            $$"""padding $${$$$$$$$$"more$$$$$$$$`text`"} padding""",
            $$$$"""padding $$$${"more$`text`"} padding""",
            $$$$"""padding $$$${$"more$`text`"} padding""",
            $$$$"""padding $$$${$$"more$$`text`"} padding""",
            $$$$"""padding $$$${$$$$"more$$$$`text`"} padding""",
            $$$$"""padding $$$${$$$$$$$$"more$$$$$$$$`text`"} padding""",
            $$$$$$$$"""padding $$$$$$$${"more$`text`"} padding""",
            $$$$$$$$"""padding $$$$$$$${$"more$`text`"} padding""",
            $$$$$$$$"""padding $$$$$$$${$$"more$$`text`"} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$"more$$$$`text`"} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$$$$$"more$$$$$$$$`text`"} padding""",
            $"""padding ${"more${"" + text}"} padding""",
            $"""padding ${$"more${"" + text}"} padding""",
            $"""padding ${$$"more$${"" + text}"} padding""",
            $"""padding ${$$$$"more$$$${"" + text}"} padding""",
            $"""padding ${$$$$$$$$"more$$$$$$$${"" + text}"} padding""",
            $$"""padding $${"more${"" + text}"} padding""",
            $$"""padding $${$"more${"" + text}"} padding""",
            $$"""padding $${$$"more$${"" + text}"} padding""",
            $$"""padding $${$$$$"more$$$${"" + text}"} padding""",
            $$"""padding $${$$$$$$$$"more$$$$$$$${"" + text}"} padding""",
            $$$$"""padding $$$${"more${"" + text}"} padding""",
            $$$$"""padding $$$${$"more${"" + text}"} padding""",
            $$$$"""padding $$$${$$"more$${"" + text}"} padding""",
            $$$$"""padding $$$${$$$$"more$$$${"" + text}"} padding""",
            $$$$"""padding $$$${$$$$$$$$"more$$$$$$$${"" + text}"} padding""",
            $$$$$$$$"""padding $$$$$$$${"more${"" + text}"} padding""",
            $$$$$$$$"""padding $$$$$$$${$"more${"" + text}"} padding""",
            $$$$$$$$"""padding $$$$$$$${$$"more$${"" + text}"} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$"more$$$${"" + text}"} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$$$$$"more$$$$$$$${"" + text}"} padding""",
            $"""padding ${"""more$text"""} padding""",
            $"""padding ${$"""more$text"""} padding""",
            $"""padding ${$$"""more$$text"""} padding""",
            $"""padding ${$$$$"""more$$$$text"""} padding""",
            $"""padding ${$$$$$$$$"""more$$$$$$$$text"""} padding""",
            $$"""padding $${"""more$text"""} padding""",
            $$"""padding $${$"""more$text"""} padding""",
            $$"""padding $${$$"""more$$text"""} padding""",
            $$"""padding $${$$$$"""more$$$$text"""} padding""",
            $$"""padding $${$$$$$$$$"""more$$$$$$$$text"""} padding""",
            $$$$"""padding $$$${"""more$text"""} padding""",
            $$$$"""padding $$$${$"""more$text"""} padding""",
            $$$$"""padding $$$${$$"""more$$text"""} padding""",
            $$$$"""padding $$$${$$$$"""more$$$$text"""} padding""",
            $$$$"""padding $$$${$$$$$$$$"""more$$$$$$$$text"""} padding""",
            $$$$$$$$"""padding $$$$$$$${"""more$text"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$"""more$text"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$$"""more$$text"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$"""more$$$$text"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$$$$$"""more$$$$$$$$text"""} padding""",
            $"""padding ${"""more$`text`"""} padding""",
            $"""padding ${$"""more$`text`"""} padding""",
            $"""padding ${$$"""more$$`text`"""} padding""",
            $"""padding ${$$$$"""more$$$$`text`"""} padding""",
            $"""padding ${$$$$$$$$"""more$$$$$$$$`text`"""} padding""",
            $$"""padding $${"""more$`text`"""} padding""",
            $$"""padding $${$"""more$`text`"""} padding""",
            $$"""padding $${$$"""more$$`text`"""} padding""",
            $$"""padding $${$$$$"""more$$$$`text`"""} padding""",
            $$"""padding $${$$$$$$$$"""more$$$$$$$$`text`"""} padding""",
            $$$$"""padding $$$${"""more$`text`"""} padding""",
            $$$$"""padding $$$${$"""more$`text`"""} padding""",
            $$$$"""padding $$$${$$"""more$$`text`"""} padding""",
            $$$$"""padding $$$${$$$$"""more$$$$`text`"""} padding""",
            $$$$"""padding $$$${$$$$$$$$"""more$$$$$$$$`text`"""} padding""",
            $$$$$$$$"""padding $$$$$$$${"""more$`text`"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$"""more$`text`"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$$"""more$$`text`"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$"""more$$$$`text`"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$$$$$"""more$$$$$$$$`text`"""} padding""",
            $"""padding ${"""more${"" + text}"""} padding""",
            $"""padding ${$"""more${"" + text}"""} padding""",
            $"""padding ${$$"""more$${"" + text}"""} padding""",
            $"""padding ${$$$$"""more$$$${"" + text}"""} padding""",
            $"""padding ${$$$$$$$$"""more$$$$$$$${"" + text}"""} padding""",
            $$"""padding $${"""more${"" + text}"""} padding""",
            $$"""padding $${$"""more${"" + text}"""} padding""",
            $$"""padding $${$$"""more$${"" + text}"""} padding""",
            $$"""padding $${$$$$"""more$$$${"" + text}"""} padding""",
            $$"""padding $${$$$$$$$$"""more$$$$$$$${"" + text}"""} padding""",
            $$$$"""padding $$$${"""more${"" + text}"""} padding""",
            $$$$"""padding $$$${$"""more${"" + text}"""} padding""",
            $$$$"""padding $$$${$$"""more$${"" + text}"""} padding""",
            $$$$"""padding $$$${$$$$"""more$$$${"" + text}"""} padding""",
            $$$$"""padding $$$${$$$$$$$$"""more$$$$$$$${"" + text}"""} padding""",
            $$$$$$$$"""padding $$$$$$$${"""more${"" + text}"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$"""more${"" + text}"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$$"""more$${"" + text}"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$"""more$$$${"" + text}"""} padding""",
            $$$$$$$$"""padding $$$$$$$${$$$$$$$$"""more$$$$$$$${"" + text}"""} padding""",
        ))
    } catch (e: TestFailureException) {
        return e.description
    }
    return "OK"
}

val text = "text"
val value = 42

class TestFailureException(val description: String): Exception(description)

fun testEquivalence(marker: String, reference: String, value: String) {
    if (reference != value) throw TestFailureException("NOT OK ($marker: \"$value\" != \"$reference\")")
}

fun testEquivalence(marker: String, reference: String, values: List<String>) {
    for ((index, value) in values.withIndex()) {
        testEquivalence("$marker[$index]", reference, value)
    }
}

val rv = box()

// expected: rv: OK
